package spaces;

import vectors.Vector;

public class Node implements Comparable<Node>{
	
	protected Vector pos;
	private final String name;
	
	public Node(String name){
		this.name = name;
	}
	
	public Node(String name, Vector pos){
		this.name = name;
		this.pos = pos;
	}
	
	public Vector getPos() {
		return pos;
	}

	public void setPos(Vector pos) {
		this.pos = pos;
	}

	public String getName() {
		return name;
	}
	
	@Override
	public int compareTo(Node node) {
		return name.compareTo(node.getName());
	}
	
	public boolean equals(Object node){
		if(node instanceof Node){
			return compareTo((Node)node) == 0;
		} else {
			return super.equals(node);
		}
	}
}
